using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Debug;

namespace GetKlient.Models
{
    public class PFlibDbContext : DbContext
    {
        private readonly ILogger<PFlibDbContext> _logger;

        public PFlibDbContext(DbContextOptions<PFlibDbContext> options, ILogger<PFlibDbContext> logger) : base(options)
        {
            _logger = logger;
        }

        public DbSet<KLConfig> KLConfig { get; set; }
        public DbSet<Monitor> Monitor { get; set; }
        public DbSet<MonitorHeartTemp> MonitorHeartTemp { get; set; }
        public DbSet<OpenData> OpenData { get; set; }
        public DbSet<OpenIns> OpenIns { get; set; }
        public DbSet<OpenInsDetail> OpenInsDetail { get; set; }

        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            optionsBuilder.UseSqlServer("connetionString");
            optionsBuilder.UseLoggerFactory(new LoggerFactory(new[] { new DebugLoggerProvider() }));
        }
    }
}